import axios from '@/libs/request/axios'

export const getTokenByUsername = (userInfo) => {
    return axios.request({
        url: '/userlogin',
        data: userInfo,
        method: 'post'
    })
}

export const refreshToken = (refresh_token) => {
    return axios.request({
        url: '/refreshtoken',
        params: {refresh_token},
        method: 'post'
    })
}
export const destoryToken = () => {
    return axios.request({
        url: '/auth/token/logout',
        method: 'delete'
    })
}
